Check links

Functions to scan files and check that all links, HREFs, SRCs etc. as well as CSS links url("...") point to files which exist. The files which are scanned are the HTML and CSS text files (the ones which have any of the suffixes as specified by the suffix mapping). For this to be useful the files in your home page folders must be mirrors of the files at your servers. If you use this function as intended you never have to worry about dead links between your files anymore.

It works as follows: In every file scanned Alpha looks for all HREFs, SRCs, etc in the file. If you use the BASE element it will be noticed and used to determine to which URL a link is pointing. Everything inside comments is ignored.

Links to remote servers, which you don't have a home page folder for, are ignored. Also, if you have a home page folder for http://www.net/~myplace/, links like http://www.net/file.html are ignored, as they are outside your home page. For all other links, Alpha checks if the file exist.

If any invalid links are found, a window is opened where the lines look as follows:

file.html               ; Line 8:   HREF="otherfile.html"
file2.html              ; Line 23:  (anchor missing) HREF="file.html#anchor"
folder:file3.html       ; Line 17:  (BASE used) SRC="pic/coolpic.gif"

In the first column is the name of the file with the link, including the path relative to the home page folder. In the second column is the line number where the invalid link is, and in the third column is the link itself. (anchor missing) means that the file exists but that the anchor is missing in the file. (BASE used) means that the file contains a BASE element. Use the up and down arrows to select a line in this window, and carriage return to open the file and select the line with the invalid link.

You can optionally check that the case of the links match the case of the file names on your disk. This can be useful as Mac file names are not case sensitive, while for example unix file names are. Therefore a link can work on your Mac but not work on a unix machine. In the preferences dialog you can tell Alpha to make a case sensitive link checking. This is slower and therefore not done by default.

Limitation:

Alpha only searches for strings like HREF="file" without checking that they are inside a tag. This means that Alpha could find links, which actually are not links. This should only be a problem in documents about HTML.

Fixing a broken link

You can fix broken links by selecting a new one. To do this

When the broken link contains an anchor "file.html#anchor", Alpha checks if the new file contains that anchor. If it does, #anchor is added to the new link, otherwise not.

Fixing a link works as long as you don't make any other changes to the file first. Then Alpha may not find the line with the link to fix.

Check Window
Checks links in current window.

Check Home Page
Check links in all html files in a home page folder and its sub folders.

Check Folder
To check links in all files in one folder. You can optionally check the subfolders.

Check File
To check links in a single file.

Check Remote Links
To check remote links in the current window using Big Brother. Big Brother 1.2 or later is required to use this function. A list of all remote links in the current window is sent to Big Brother. Big Brother checks the links and sends the result back to Alpha, which displays the result in a window. If a page has moved to a new location the link in your HTML window is automatically updated. Don't make any other changes to the file while checking remote links, because then Alpha may not find the line with the link to update.

Use Big Brother
Marks this menu item to indicate that link checks will be done with Big Brother instead of Alpha. If this menu item is checked, files and folders will be sent to Big Brother when you check links.

Some settings are temporarily changed in Big Brother, when you send a file or folder to it. These are

Big Brother is a shareware program by François Pottier, Francois.Pottier@inria.fr. You can get Big Brother from his home page.

The big advantage with Big Brother is that it can check all your remote links. It checks local links on your hard disk with about the same speed as Alpha, but Big Brother can run in the background while you do other things.

Other differences:

This comparison was done with Big Brother 1.2, and may of course not apply to later versions.